{% load niji_tags %}
{%  if is_paginated %}
    <nav>
        <ul class="pagination">
            {% if page_obj.has_previous %}
                <li>
                    <a href="{% change_page request page_obj.previous_page_number  %}" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
                {% endif %}
        {% for page in page_numbers %}
            {% if page  %}
                {% ifequal page page_obj.number %}
                    <li class="active">
                        <a href="#">{{ page }}</a>
                    </li>
                    {% else %}
                    <li>
                        <a href="{%  change_page request page %}">
                            {{ page }}
                        </a>
                    </li>

                {% endifequal %}
                {% else %}
                ...
            {% endif %}
        {% endfor %}
        {%  if page_obj.has_next %}
            <li>
            <a href="{% change_page request page_obj.next_page_number %}" aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
            </a>
            </li>
        {% endif %}

        </ul>
    </nav>
{% endif %}